package server;

import java.util.Calendar;

/** A Feedback Manager printing on console.
 */
public class ConsoleFeedback implements FeedbackManager {
	
	
	public ConsoleFeedback () {
		
	}

	
	@Override
	public void printInfoMessage (String message) {
		System.out.println("INFO: "+message);
	}
	
	
	@Override
	public void printErrorAndExit(String text) {
		System.err.println("ERROR: "+text);
		System.exit(-1);
	}
	
	
	@Override
	public void printMessage (String message, boolean clearArea) {
		System.out.println("SERVER@"+Server.getSharedInstance().getServerAddress().toString()+" ("+
				Calendar.getInstance().getTime()+") : "+message);
	}
	
	
	@Override
	public void update () {
		//doNothing
	}
}
